package com.kfm.service.impl;

import com.kfm.entity.Account;
import com.kfm.mapper.AccountMapper;
import com.kfm.service.AccountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class AccountServiceImpl implements AccountService {

    @Autowired
    private AccountMapper mapper;

    @Override
    public int save(Account account) {
        if (account != null){
            return mapper.save(account);
        }else{
            throw new NullPointerException("数据不能为null");
        }
    }

    @Override
    public Account findById(Integer id) {
        return null;
    }
}
